<template>
    <scroll-view class="record_outer" @scrolltolower="refreshList" :scroll-y="true">
        <view class="record_header">
            <u-navbar @rightClick="isShowDatetimePicker = true" :autoBack="true" height="152rpx" bgColor="#FFFAEF"
                :fixed="true" :border="true" :placeholder="true">
                <view slot="left" class="record_header_back">
                    <image src="@/static/record/goback.png"></image>
                </view>
                <view slot="center" class="record_header_title">该城市钻石手续费奖励</view>

            </u-navbar>
        </view>

        <scroll-view :scroll-y="true" class="record_list" :style="{ height: rewardRecordListHeight + 'rpx' }"
            @scrolltolower="refreshList">
            <view class="record_item" v-for="item, index in 10" :key="index">
                <view class="record_item_left">
                    <view class="record_item_left_top"><text>这是一段描述这是一段描述限制字符19...</text></view>
                    <view class="record_item_left_down"><text>2024/02/03 15:56:56</text></view>
                </view>
                <view class="record_item_right">
                    <!-- <text class="add" v-if="item.num > 0">+{{ Math.floor(item.num) / 1000 }}K</text>
                    <text class="subtract" v-else>{{ Math.floor(item.num) / 1000 }}K</text> -->
                    <text class="add">+8888</text>
                
                </view>

            </view>
        </scroll-view>
    </scroll-view>
</template>

<script>
import "./recordIconfont/iconfont.css";
export default {
    data() {
        return {
            rewardRecordListHeight: 0

        }
    },
    onLoad() {
        this.computedHeight()
    },
    methods: {
        GoBack() {
            uni.switchTab({
                url: "/pages/my/index",
            });
        },

        computedHeight() {
            uni.getSystemInfo({
                success: (res) => {
                    const screenHeight = res.windowHeight; // 屏幕高度，单位为px
                    this.rewardRecordListHeight = this.$pxToRpx(screenHeight) - 320;
                },
            });
        },
    },
};
</script>

<style lang="scss" scoped>
.record_outer {
    width: 100vw;
    height: 100vh;
    background: #fffaef;

    .record_header {
        .record_header_title {
            font-size: 46rpx;
            font-family: DreamHanSansSC;
            font-weight: 600;
            color: #302b26;
        }

        .record_header_date {
            width: 199rpx;
            height: 48rpx;
            background: #f5f0e5;
            border: 1px solid #ffa814;
            border-radius: 24rpx;
            display: flex;
            justify-content: center;
            align-items: center;

            text {
                font-size: 25rpx;
                font-family: Dream Han Sans SC;
                font-weight: normal;
                color: #ffa814;
            }
        }

        .record_header_back {
            width: 46rpx;
            height: 46rpx;

            image {
                width: 100%;
                height: 100%;
            }
        }
    }
    .record_list {
        width: 100vw;

        .record_item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 2rpx solid rgb(183, 178, 169, 0.35);
            padding: 42rpx 0;

            .record_item_left {
                margin-left: 44rpx;
                display: flex;
                flex-direction: column;
                row-gap: 16rpx;

                .record_item_left_top {
                    font-size: 29rpx;
                    font-family: Inter, Inter;
                    font-weight: 600;
                    color: #302B26;
                }

                .record_item_left_down {
                    font-size: 26rpx;
                    font-family: Inter, Inter;
                    font-weight: 400;
                    color: #6C6862;


                }
            }

            .record_item_right {
                margin-right: 44rpx;

             

                .add {
                    font-size: 38rpx;
                    font-family: Inter, Inter;
                    font-weight: 600;
                    color: #FC4100;
                }

                .subtract {
                    font-size: 38rpx;
                    font-family: Inter, Inter;
                    font-weight: 600;
                    color: #000000;
                }
            }
        }
    }
}
</style>